A modern web application for automating vulnerability patch evidence collection and lifecycle management
The AMI Patch Evidence Tracker streamlines the patch management workflow by automating evidence collection, vulnerability analysis, and change request documentation. It provides a centralized platform for tracking patch events across DEV, STAGE, and PROD environments with a modern, interactive user interface.
| Challenge | Solution |
|---|---|
| Manual evidence collection takes hours | Automated BEFORE/AFTER scan comparison in seconds |
| Inconsistent CR documentation across teams | Standardized, auto-generated CR summaries |
| No centralized patch tracking | Single dashboard for all environments |
| Error-prone vulnerability diffing | Automated computation with zero human error |
| Compliance audit gaps | Complete audit trail with timestamped evidence |
- Capture - Create and manage patch events with metadata (service, environment, AMI ID, date)
- Generate - Produce synthetic BEFORE and AFTER vulnerability scan snapshots
- Compute - Automatically identify fixed vulnerabilities through set difference
- Analyze - Visualize data with interactive charts, tables, and exportable reports
- Document - Generate CR-ready summaries for STAGE and PROD deployments
- Enforce - Control patch lifecycle progression with the State Pattern
Note: This application uses synthetic data only for demonstration and development purposes. It does not connect to any real vulnerability scanners or production systems.
The central hub for managing all patch events across your infrastructure.
| Feature | Description |
|---|---|
| Summary Statistics | Animated counters showing totals by environment and lifecycle phase |
| Real-time Search | Instantly filter events by typing keywords |
| Advanced Filters | Filter by service, environment, or lifecycle state |
| Sortable Columns | Click any column header to sort ascending/descending |
| Pagination | Configurable page sizes (5, 10, 25, 50 items) |
| View Toggle | Switch between table and card layouts |
| Quick Actions | One-click access to details or vulnerability analysis |
The command center for individual patch events with guided workflow.
| Feature | Description |
|---|---|
| Metadata Card | Service, environment, AMI ID, patch date, and notes |
| Visual Workflow Tracker | 3-step progress indicator (BEFORE → AFTER → Compute) |
| Collapsible Sections | Expandable panels for BEFORE, AFTER, and Fixed vulnerabilities |
| Severity Badges | Color-coded counts (Critical, High, Medium, Low) |
| Lifecycle Controls | State transition dropdown with validation |
| CR Generation | One-click STAGE and PROD change request summaries |
Comprehensive data visualization and reporting dashboard.
| Feature | Description |
|---|---|
| Interactive Charts | Radar, Bar/Line, and Donut/Polar charts (Chart.js) |
| Chart Type Switching | Toggle between visualization styles |
| Tabbed Tables | Fixed, Remaining, Before, and After vulnerability views |
| Search & Filter | Real-time filtering by keyword or severity |
| Sortable Tables | Click column headers to sort data |
| Export Options | Download as CSV or JSON |
| Report Generation | Risk score, severity breakdown, and recommendations |
| Print Support | Print-friendly formatting |
- Animated backgrounds with floating orbs and hex grid patterns
- Glassmorphism with blur effects and gradient borders
- 3D card effects with smooth hover animations
- Responsive layout for desktop and tablet
| Key | Action |
|---|---|
N |
Create new patch event |
D |
Go to Dashboard |
A |
Go to Analysis view |
? |
Show shortcuts help |
Esc |
Close modals |
Real-time, non-intrusive feedback for all user actions.
| Layer | Technology |
|---|---|
| Backend | Python 3.10+, FastAPI, SQLAlchemy ORM |
| Database | SQLite (local file) |
| Templating | Jinja2 |
| Frontend | Tailwind CSS, DaisyUI, Chart.js |
| Design Pattern | State Pattern for lifecycle management |
DEV_EVIDENCE_CAPTURED → DEV_VERIFIED → STAGE_CR_READY → STAGE_PATCHED → PROD_CR_READY → PROD_PATCHED → CLOSED
The State Pattern enforces valid transitions and prevents promotion without required evidence.
AMI_Patch_Evidence_Tracker/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app entrypoint
│ ├── database.py # SQLite + SQLAlchemy configuration
│ ├── models.py # ORM models and enums
│ ├── state.py # State Pattern for patch lifecycle
│ ├── services/
│ │ ├── __init__.py
│ │ ├── synthetic_data.py # Synthetic scan generators
│ │ ├── diff.py # Fixed vuln diff + severity counts
│ │ └── cr_text.py # CR summary text generation
│ └── web/
│ ├── __init__.py
│ └── routes.py # Dashboard + patch event + analysis routes
├── templates/
│ ├── base.html # Shared layout + synthetic data banner
│ ├── dashboard.html # Interactive dashboard with search/sort/pagination
│ ├── patch_event_detail.html # Patch event detail + workflow + collapsible sections
│ └── vulnerability_analysis.html # Full analysis view with charts and reports
├── static/ # Static assets (CSS/JS/images if needed)
├── requirements.txt # Runtime Python dependencies
└── README.md # This file
- Python 3.10+ (recommended)
- Git
- A terminal (PowerShell / cmd on Windows, or bash/zsh on macOS/Linux)
Replace <REPO_URL> with your GitHub URL for this project.
git clone <REPO_URL>
cd project_6_wingsurfWindows (PowerShell):
python -m venv .venv
.venv\Scripts\Activate.ps1macOS / Linux:
python -m venv .venv
source .venv/bin/activateInstall the runtime dependencies from requirements.txt:
pip install --upgrade pip
pip install -r requirements.txtInstall development tools (linting/formatting):
pip install black isort flake8 flake8-htmlFrom the project root (with the virtual environment activated):
python -m uvicorn app.main:app --reloadThen open your browser at:
You should see the Dashboard screen with:
- A synthetic data disclaimer banner
- An empty patch event list (on first run)
- A "Create Patch Event" button
All data is stored in a local SQLite file (patch_tracker.db) created automatically in the project directory on first startup.
Follow these steps to experience the full application workflow:
1. CREATE → Click "New Patch Event" on the Dashboard
2. CONFIGURE → Select service, environment, AMI ID, and patch date
3. GENERATE → Click "Gen" for BEFORE scan (creates synthetic vulnerabilities)
4. GENERATE → Click "Gen" for AFTER scan (simulates post-patch state)
5. COMPUTE → Click "Compute" to identify fixed vulnerabilities
6. ANALYZE → Click "View Full Analysis" for charts and reports
7. DOCUMENT → Generate CR summaries for STAGE and PROD
8. PROMOTE → Use lifecycle transitions to move through environments
- Cannot promote to STAGE/PROD states without DEV evidence
- Cannot close until
PROD_PATCHEDstate is reached - Invalid transitions are blocked with error messages
All CVEs, plugin IDs, AMI IDs, and hosts are randomly generated synthetic values. No real vulnerability scanners or production systems are accessed.
black app # Format code
isort app # Sort imports
flake8 . # Run linterCreate .flake8 in project root:
[flake8]
max-line-length = 119
exclude = .git,__pycache__,.venv| Benefit | Impact |
|---|---|
| Time Savings | Evidence collection reduced from hours to minutes |
| Consistency | Standardized CR documentation across all teams |
| Accuracy | Zero human error in vulnerability diffing |
| Compliance | Complete audit trail with timestamped evidence |
| Visibility | Single source of truth for all patch events |
| Scalability | Handles hundreds of events efficiently |
MIT License - See LICENSE file for details.
Developed as part of the OpenClassrooms workplace project requirements.